<?php

use Illuminate\Routing\Router;


Route::group([
    'prefix' => 'admin/wiki',
    'namespace' => 'Beerus\\Modules\\Wiki\\Controllers',
    'middleware' => [
        'web',
        'admin'
    ],
], function (Router $router) {

    $router->get('/index', 'IndexController@index');
    $router->get('/merge', 'IndexController@mergePage');
    $router->get('/searchWiki', 'IndexController@searchWiki');
    $router->get('/replaceWiki', 'IndexController@replaceWiki');
    $router->get('/editWiki', 'IndexController@editWiki');
    $router->get('/searchBrand', 'IndexController@searchBrand');
    $router->get('/searchStyle', 'IndexController@searchStyle');
    $router->get('/admList', 'AdmController@index');
    $router->get('/admList/export', 'AdmController@export');

    //wiki商品画像
    $router->get('/screen/list', 'WikiPortraitController@screenList');
    $router->get('/screen/export', 'WikiPortraitController@screenExport');

    $router->get('/relateWiki', 'ObjRelateWikiController@index');
    $router->get('/relateWiki/{pic_id}', 'ObjRelateWikiController@wiki');
    $router->post('/relateWiki/{note_id}/relate', 'ObjRelateWikiController@saveRelate');
    $router->post('/relateWiki/{note_id}/delRelate', 'ObjRelateWikiController@delRelate');
    $router->post('/relateWiki/search', 'ObjRelateWikiController@wikiSearch');

    $router->get('/admList', 'AdmController@index');
    $router->get('/pack_list', 'AdmController@wikiListByPackageId');
    $router->get('/admList/{id}/edit', 'AdmController@wikiEdit');
    $router->post('/admList/{id}/save', 'AdmController@wikiSave');
    $router->post('/admList/{id}/reload', 'AdmController@wikiReload');
    $router->get('/admList/create', 'AdmController@addWiki');
    $router->post('/admList/insert', 'AdmController@insertWiki');
    $router->post('/admList/{id}/offline', 'AdmController@offLineWiki');
    $router->post('/admList/{id}/setOfficial', 'AdmController@setOfficial');

    $router->get('/admList/abnormal', 'AdmController@abnormal');

    $router->get('/admList/{id}/editLike', 'AdmController@editLike');
    $router->post('/admList/{id}/postEditLike', 'AdmController@postEditLike');

    // 广告 曝光套餐白名单
    $router->get('/adwhitelist', 'AdWhiteListController@index');
    $router->get('/adwhitelist/create', 'AdWhiteListController@create');
    $router->get('/adwhitelist/{id}/edit', 'AdWhiteListController@create');
    $router->post('/adwhitelist/update/{id}', 'AdWhiteListController@update');
    $router->get('/adwhitelist/getbasicinfo', 'AdWhiteListController@getBasicInfo');

    $router->get('/shareWiki', 'ShareWikiListController@index');
    $router->post('/shareWiki/{id}/cancel', 'ShareWikiListController@cancel');

    // 好物专辑
    $router->get('/goodsAlbum/index', 'GoodsAlbumController@index')->name('goodsAlbum.list');
    $router->get('/goodsAlbum/index/create', 'GoodsAlbumController@create');
    $router->get('/goodsAlbum/index/{id}/edit', 'GoodsAlbumController@create');
    $router->post('/goodsAlbum/index/create', 'GoodsAlbumController@save')->name('goodsAlbum.save');
    $router->post('/goodsAlbum/index/act', 'GoodsAlbumController@act')->name('goodsAlbum.act');


    $router->get('/alitest/index', 'AliTestController@index');

});
